Date.prototype.format = function () {
    var s = '';
    var month = (this.getMonth() + 1) >= 10 ? (this.getMonth() + 1) : ('0' + (this.getMonth() + 1));
    var day = this.getDate() >= 10 ? (this.getDay()) : ('0' + this.getDay());
    s += this.getFullYear() + '-';
    s += month + '-';
    s += day;
    return s
};

export function getAll(begin, end) {
    var arr = [];
    var ab = begin.split('-');
    var ae = end.split('-');
    var db = new Date();
    db.setUTCFullYear(ab[0], ab[1]-1, ab[2]);
    var de = new Date();
    de.setUTCFullYear(ae[0], ae[1]-1, ae[2]);
    var unixDb = db.getTime() - 24*60*60*1000;
    var unixDe = de.getTime() - 24*60*60*1000;
    for (let k = unixDb; k < unixDe;) {
        k = k + 24*60*60*1000;
        arr.push(new Date(parseInt(k)).format())
    }
    return arr;
}
